home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d3 / rettig.arc / TRSOURCE.EXE / ISTSTIME.C < prev    next >
C/C++ Source or Header  |  1990-10-22  |  554b  |  26 lines

  1. /*********
  2. * Function: ISTSTIME
  3. * By: Tom Rettig
  4. * Placed in the public domain by Tom Rettig Associates, 10/22/1990.
  5. *
  6. *  Syntax: ISTSTIME( <expC> )
  7. *  Return: True if <expC> is a valid time string, otherwise false.
  8. *  Note  : Valid time string is "HH:MM:SS", 
  9. *             where HH==0..23, MM==0..59, SS==0.59.
  10. *********/
  11.  
  12. #include "trlib.h"
  13.  
  14. TRTYPE iststime()
  15. {
  16.    char *instr;
  17.    if ( PCOUNT == 1 && ISCHAR(1) )
  18.    {
  19.       instr = _parc(1);
  20.       _retl( VALIDTIME(instr) );
  21.    }
  22.    else
  23.       _retl(ERROR); /* if error */
  24. }
  25.  
  26.